#include <iostream>
#include <algorithm>

using namespace std;

// 求最大公约数
int gid(int a, int b) {
    return b == 0 ? a : gid(b, a % b);
}

int a[100005], n, ans;

int main() {
    cin >> n;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    sort(a, a + n);

    ans = a[1] - a[0];
    for (int i = 2; i < n; ++i) {
        ans = gid(ans, a[i] - a[i - 1]);
    }
    if (a[n - 1] - a[0] == 0) {
        cout << n << endl;
    } else {
        cout << (a[n - 1] - a[0]) / ans + 1;
    }

    return 0;
}